<%@ page import="java.io.* , java.util.*, java.sql.*, com.myapp.struts.dao.*,com.myapp.struts.actionform.*,com.myapp.struts.beans.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <!-- DW6 -->
    <head>
        <!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
        <title>Item Master</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css"> 
        <script language="javascript">
            function validate()
            {
                var x=0;
                for (i=0;i<document.form1.temp.length;i++)
                {
                    if(document.form1.temp[i].checked == false)
                        x++;
                    if (x==document.form1.temp.length)
                    {
                        alert("Please Check Any CheckBox!.....");
                        return false;
                    }
                }
            }
        </script>
    </head>
    <body>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="436" align="center"><form action="locAllocation.jsp" method="post" name="form1" id="form1" onSubmit="return validate();">
                        <table width="100%" height="432" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <th height="40" colspan="2" align="center" valign="middle" scope="col"> <input name="Location" type="submit" value="Issue To Site"  />
                                </th>
                            </tr>
                            <tr>
                                <td height="342" align="center" valign="top" scope="col"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <th width="146" height="38" align="center">S.No</th>
                                            <th valign="middle">Item Name</th>
                                            <th width="160"  align="center" valign="middle">Balance Qty</th>
                                        </tr>
                                        <tr>
                                            <%
              
                                                              AllocationDao sdao=new AllocationDao();
                                              Vector gp1 = sdao.getItemStock();
                                      if (gp1 != null) {
                                                      for (int i=0,j=1;i<(gp1.size())&& j<(gp1.size());i+=2,j+=2)
                                                      {
                                            %>
                                        </tr>
                                        <tr align="center" >
                                            <td ><input name="temp" type="checkbox" value='<%=gp1.elementAt(i)%>'></td>
                                            <td align="center" valign="middle"><div align="center" class="style13"><strong><span class="style12"><%=gp1.elementAt(i)%>&nbsp;&nbsp;</span></strong></div></td>
                                            <td ><span class="style9"><strong><%=gp1.elementAt(j)%></strong></span></td>
                                        </tr>
                                        <%
                                                }
                                              }
                                        %>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </form></td>
            </tr>
        </table>
    </body>
</html>
